﻿
using System.Collections.Generic;

public class School
{
    public int SchoolId { get; set; }
    public string Name { get; set; }

    public List<Class> Classes { get; set; }
}

public class Class
{
    public int ClassId { get; set; }
    public string Name { get; set; }

    public int SchoolId { get; set; }
    public School School { get; set; }
    public List<Student> Students { get; set; }
}

public class Student
{
    public int StudentId { get; set; }
    public string Name { get; set; }
   
    public int ClassId { get; set; }
    public Class Class { get; set; }
}


public class DatabaseOperations
{
    private readonly string _connectionString;

    public DatabaseOperations(string connectionString)
    {
        _connectionString = connectionString;
    }

   
    public void AddStudent(Student student)
    {
        using (var connection = new SQLiteConnection(_connectionString))
        {
            connection.Open();
            var command = connection.CreateCommand();
            command.CommandText = "INSERT INTO Students (Name, ClassId) VALUES (@Name, @ClassId)";
            command.Parameters.AddWithValue("@Name", student.Name);
            command.Parameters.AddWithValue("@ClassId", student.ClassId);
            command.ExecuteNonQuery();
        }
        
    }

   
}

// 日志记录类
public class LogOperations
{
    // 日志记录方法...
}
